﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MaxLeaf.Common
{

    public enum LogStatus
    {
        Add,
        Update,
        Delete
    }

    public enum LogType
    {
        T_icitem
        , t_Department
        , order_main
        , ICSale
        , ICStockBill
        , ICStockBillEntry
        , t_Base_Emp
        , t_SubMessage
        , t_barcode
        , ICPrcPly
        , ICPrcPlyEntry
        , ICDisPly
        , ICDisPlyEntry
        , t_Organization_K3
        , ImInvGroup_1
        , ImInvGroup_2
        , t_MeasureUnit
        , t_UnitGroup
        , goods_brand
        , goods_category
        , goods_main
        , goods_barcode
        , region_mdc
        , user_main
        , SEOutStockChecked
        , ICStockBillChecked
        , ICSaleChecked
            ,ICSaleUnChecked
        ,RedICStockBillDeleted
        , t_icItemDeleted


        , goods_attribute
        //, goods_brand
        , goods_cat_attribute
        , goods_cat_attribute_value
        //, goods_category
        //, goods_main
        , goods_measure_unit
        , goods_price
        , goods_unit_group
        //, user_main
        , region_main
        , user_contract
        , user_contract_category
        , user_contract_goods
        //, order_main
        , goods_gallery
        , user_info
        ,goods_sale_measure
        , goods_replace

    }

    public enum InFoType
    {
        CheckLog,        
        DeleteLog
    }

    public enum ServerType
    {
        K3,
        Web,
        SCP,
        All
    }

    public enum DateFormatOption
    {
        DateFmtMDY = 0,
        FmtDtp,
        DateFmtMD,
        DateFmtYMD,
        DateFmtMY
    }
    public class SystemDateOption
    {
        public static string optDateFmtMDY
        {
            get { return "MM/dd/yyyy"; }
        }
        public static string optFmtDtp
        {
            get { return "MM/dd/yyy"; }
        }
        public static string optDateFmtYMD
        {
            get { return "yyyy/MM/dd"; }
        }
        public static string optDateFmtMY
        {
            get { return "MM/yyyy"; }
        }
        public static string GetFormat(DateFormatOption opt)
        {
            switch (opt)
            {
                case DateFormatOption.DateFmtMDY:
                    return SystemDateOption.optDateFmtMDY;
                case DateFormatOption.FmtDtp:
                    return SystemDateOption.optFmtDtp;
                case DateFormatOption.DateFmtYMD:
                    return SystemDateOption.optDateFmtYMD;
                case DateFormatOption.DateFmtMY:
                    return SystemDateOption.optDateFmtMY;

            }
            return "";

        }
    }
}
